body {
    margin: 0;
    font-family: '微软雅黑';
}
.clearfix:after {
    content: "";
    display: table;
    clear: both;
    overflow: hidden;
}

.clearfix {
    /* Fix IE8 */
    zoom: 1;
}

#header {
    background-color: #F9F9F9;
    height: 69px;
    border-bottom: 1px solid #EEE;
}
#header .inner {
    width: 500px;
    margin: 0 auto;
}
#header h1 {
    float: left;
    font-size: 22px;
    height: 69px;
    line-height: 69px;
    margin: 0;
    font-weight: normal;
    color: #AAA;
}
#header .toggle {
    position: relative;
    width: 130px;
    float: right;
    height: 30px;
    line-height: 30px;
    margin-top: 20px;
    border-radius: 15px;
    background-color: #FFF;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, .3);
}
#header .toggle a {
    display: block;
    position: absolute;
    z-index: 2;
    width: 50px;
    height: 30px;
    padding-left: 10px;
    top: 0;
    left: 0;
    text-decoration: none;
    font-size: 12px;
    text-align: center;
    color: #207FCA;
    transition: .3s;
}
#header .toggle a.decode {
    left: 60px;
    padding-right: 10px;
}
#header .toggle .navbg {
    position: absolute;
    width: 70px;
    height: 30px;
    top: 0;
    z-index: 1;
    border-radius: 15px;
    background: #207FCA;
    transition: .3s;
}
#header .toggle a.encode, #header .toggle.sec a.decode {
    color: #FFF;
}
#header .toggle a.decode, #header .toggle.sec a.encode {
    color: #207FCA;
}
#header .toggle.encode-hover a.encode, #header .toggle.decode-hover a.decode {
    color: #FFF;
}
#header .toggle.encode-hover a.decode, #header .toggle.decode-hover a.encode {
    color: #207FCA;
}
#header .toggle.sec .navbg, #header .toggle.decode-hover .navbg {
    left: 60px;
}
#header .toggle .navbg, #header .toggle.encode-hover .navbg {
    left: 0;
}


#qrdecode {
    display: none;
    width: 500px;
    height: 585px;
    margin: 30px auto;
    padding: 20px;
    font-size: 14px;
}
.box {
    border-radius: 10px;
    border: 4px dashed #CCC;
    padding: 1px;
    position: relative;
    height: 380px;
    overflow: hidden;
    -webkit-user-select: none;
    transition: 1s;
}
.box.dropout {
    border-color: #207FCA;
}
.box.dropin {
    background-color: #207FCA;
    border-color: #FFF;
}
.box.dropin .drop p {
    color: #FFF;
}
.box .panel {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 490px;
    height: 380px;
}
.box .preview {
    display: none;
}
.box .preview canvas {
    margin: 40px 95px;
}
.box .preview .close {
    position: absolute;
    top: 2px;
    right: 2px;
    display: block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 20px;
    font-family: 'Times New Roman';
    cursor: default;
}
.box .preview .close:hover {
    color: #F62;
}
.box .upload {
    /* display: none; */
}
.box .upload p {
    position: absolute;
    z-index: 1;
    height: 40px;
    width: 490px;
    top: 120px;
    left: 0;
    text-align: center;
    font-size: 32px;
    line-height: 40px;
    margin: 0;
    color: #CCC;
}
#src-input {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    border: 0;
    z-index: 2;
    height: 100%;
    width: 100%;
    outline: none;
    opacity: 0;
    filter: alpha(opacity=0);
    cursor: default;
}
.box .upload .upimg {
    position: absolute;
    z-index: 3;
    width: 110px;
    height: 40px;
    overflow: hidden;
    margin: 170px 190px;
}
.box .upload .upimg label {
    display: block;
    height: 40px;
    width: 110px;
    background: #207FCA;
    background-size: 40px 40px;
    line-height: 40px;
    font-size: 14px;
    color: #FFF;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
}
.box .upload .upimg label:hover {
    background: #2279BE;
}
@font-face {
    font-family: 'qrcode';
    src: url('fonts/qrcode.ttf?-rqofty') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.icon-upload {
    font-family: 'qrcode';
    -webkit-font-smoothing: antialiased;
    margin-right: 10px;
}

.icon-upload:before {
    content: "\e600";
}

.box .upload .upimg input {
    width: 198px;
    height: 28px;
    display: none;
}
.box .drop {
    display: none;
}

.box .drop p {
    height: 40px;
    margin: 170px 0;
    text-align: center;
    font-size: 32px;
    line-height: 40px;
    color: #CCC;
}

/* Result */
.result {
    display: none;
    margin-top: 20px;
}

.result .hd {
    height: 30px;
    text-align: right;
}

.result .hd h3 {
    height: 30px;
    line-height: 30px;
    margin: 0;
    float: left;
}
.result .hd button {
    float: right;
    height: 24px;
    border: 0;
    margin: 3px 0;
    padding: 0 10px;
    border-radius: 2px;
    font-size: 12px;
    font-family: '微软雅黑';
    color: #FFF;
    background-color: #666;
}
.result .hd span {
    display: none;
    margin-right: 10px;
    height: 30px;
    line-height: 28px;
    font-size: 12px;
    color: #5B8;
}

.result textarea {
    margin: 5px 0 0 0;
    width: 486px;
    padding: 6px;
    line-height: 22px;
    height: 66px;
    border: 1px solid #CCC;
    border-radius: 2px;
    outline: none;
    resize: none;
}

#mask {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, .1);
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    min-width: 530px;
    min-height: 675px;
    z-index: 5;
    opacity: 0;
    filter: alpha(opacity=0);
}
#mask .mbox {
    width: 500px;
    height: 390px;
    background: rgba(22, 88, 255, .1);
    margin: 45px auto 0;
}

#qrencode {
    width: 500px;
    margin: 0 auto;
}


#input-area {
    margin-top: 20px;
}
#input-area textarea {
    width: 488px;
    border: 1px solid #CCC;
    border-radius: 4px;
    height: 80px;
    padding: 5px;
    outline: none;
    resize: none;
    line-height: 20px;
    font-size: 13px;
}
#input-area textarea:hover {
    border-color: #AAA;
}

#input-area textarea:focus {
    border-color: #207FCA;
}
#input-area div {
    text-align: right;
    margin: 5px 0;
}
#input-area button {
    padding: 3px 8px;
    font-family: '微软雅黑';
    margin: 0;
}

.resultbox {
    width: 500px;
    height: 500px;
    position: relative;
    overflow: hidden;
}
.resultbox img {
    max-width: 500px;
    max-height: 500px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
}
.resultbox canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0;
    filter: alpha(opacity=0);
}
